/*
* blogwizard.h - This file is the part of the wp-notifier.(code name "luan luan")
* Copyright (C) 2010 Dean Lee <deanlee3@gmail.com>, http://www.deanlee.cn
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
* 
* Acknowledgements:
*   <> Many thanks to all of you, who have encouraged me to update my articles
*     and code, and who sent in bug reports and fixes.
* 
*/
#ifndef BLOGWIZARD_H
#define BLOGWIZARD_H
#include <QWizard>
#include "ui_account.h"
#include "configdlg.h"
#include "blog.h"
class QProgressBar;
class AccountPage : public QWizardPage
{
public:
	AccountPage(const Blog* blog, QWidget* parent);
	~AccountPage();
	void initializePage();
	bool validatePage();
protected:
	Ui::AccountDlg ui_;
	const Blog* m_oldBlog;

};

class ProgressPage : public QWizardPage
{
	Q_OBJECT
public:
	ProgressPage(QWidget* parent);
	~ProgressPage();
	void initializePage();
protected slots:
	void xmlRpcFinished(bool);
protected:
	QLabel* m_label;
	QProgressBar* m_progress;
};

class FinishPage : public QWizardPage
{
	Q_OBJECT
public:
	FinishPage(QWidget* parent);
	~FinishPage();
	void initializePage();
protected:
	//QLineEdit* m_nickname;
	QLabel* m_message;
};

class BlogWizard : public QWizard
{
	Q_OBJECT
public:
	BlogWizard(const Blog* blog = NULL, QWidget* parent = NULL);
	~BlogWizard();
	const QList<Blog>& blogs()const
	{
		return m_blogs;
	}
protected:
	const Blog* m_oldBlog;
	QList<Blog> m_blogs;
	friend AccountPage;
	friend ProgressPage;
	friend FinishPage;
};

#endif